package cate.common.table.trademall.currencyshop;

import cate.common.table.ESheet;
import cate.common.util.TimeTool;

public class PayM1RebateSheet extends ESheet<PayM1RebateRow> {
    @Override
    public String getSheetName() {
        return "紫钻返利";
    }

    public PayM1RebateRow getRebateRow(long openTime){
        for(PayM1RebateRow row : getList()){
            long startTime = TimeTool.calTimeStamp(openTime, row.startDay, row.startTimeStr);
            long endTime = TimeTool.calTimeStamp(openTime, row.endDay, row.endTimeStr);
            if(System.currentTimeMillis() >= startTime && System.currentTimeMillis() <= endTime){
                return row;
            }
        }
        return null;
    }
}
